﻿
new Vue({
    el: '#app',
    delimiters:['[[', ']]'],

    data: {
        animoji_id: {{ animoji.animoji_id }},
        animoji_name: '{{ animoji.animoji_name }}',
        animoji_resource: '{{ animoji.animoji_url }}',
        animoji_orderno: '{{ animoji.orderno }}',
    },

    methods: {
        saveAnimojiInfo() {
            let url = "{% url 'gma:api_edit_animoji' %}";
            let data = {
                'animoji_id' : this.animoji_id,
                'animoji_name' : this.animoji_name,
                'animoji_orderno' : this.animoji_orderno,
                'animoji_resource' : this.animoji_resource,
            };
            new my_ajax(url, data, '', '', () => {
                show_toast('修改成功');
                redirect();
            });
        },

        cancel() {
            window.history.back();
        },
    },

    mounted() {
    },
});
